import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;

public class Temps {
	
	public HashMap<String,Integer> argFctPredefinie = new HashMap<String,Integer>();
	
	public HashMap<String,Method> methodFctPredefinie = new HashMap<String,Method>();
	
	public Temps() {
		argFctPredefinie.put("temps", 0);
		argFctPredefinie.put("tempsmilli", 0);
		
		Class c = Temps.class;
		Method[] tab = c.getMethods();
		
		Method  m;
		for (int i=0;i<tab.length;i++) {
			m = tab[i];
			if(m.getName().equals("temps"))
				methodFctPredefinie.put("temps", m);
			if(m.getName().equals("tempsmilli"))
				methodFctPredefinie.put("tempsmilli", m);
		}
	}
	
	public static Object temps(ArrayList<Object> v,  HashMap<String, Object> penv) {
		Date d = new Date();
		ArrayList AL = new ArrayList();
		AL.add(d.getHours()+":"+d.getMinutes()+":"+d.getSeconds());
		AL.add(d.getDay());		
		AL.add(d.getMonth());
		AL.add(d.getYear());		
		return AL;
	}
	
	public static Object tempsmilli(ArrayList<Object> v,  HashMap<String, Object> penv) {
		Date d = new Date();		
		return d.getTime();
	}

}
